

jQuery(document).ready(function(){
	///// TRANSFORM CHECKBOX /////							
	jQuery('input:checkbox').uniform();
	
	///// LOGIN FORM SUBMIT /////
	jQuery('#login').submit(function(){
	
		if(jQuery('#username').val() == '' && jQuery('#password').val() == '') {
			nousername();
			return false;	
		}
		if(jQuery('#username').val() != '' && jQuery('#password').val() == '') {
			nopassword();
			return false;;
		}
	});
	
	 
	
	///// ADD PLACEHOLDER /////
	jQuery('#username').attr('placeholder','Username');
	jQuery('#password').attr('placeholder','Password');
});

function nousername(){
	jQuery('.nousername').fadeIn();
	jQuery('.nopassword').hide();
}

function nopassword(){
	jQuery('.nopassword').fadeIn().find('.userlogged h4, .userlogged a span').text(jQuery('#username').val());
	jQuery('.nousername,.username').hide();
}
